# 1. 类属性是可以通过类直接修改值的
# 1. 但是不能通过修改 dict 的方式修改
# 1. 但是对象是可以dict修改的

class Money:
    age = 11
    num = 666
    pass


Money.age = 22
print(Money.age)
print(Money.__dict__)

Money.__dict__['age'] = 44 # 不能进行修改 这里直接报错

print(Money.__dict__) 

# 22
# {'__module__': '__main__', 'age': 22, 'num': 666, '__dict__': <attribute '__dict__' of 'Money' objects>, '__weakref__': <attribute '__weakref__' of 'Money' objects>, '__doc__': None}
# Traceback (most recent call last):
#   File "C:\Users\wyl350\Desktop\demo-python\ÃæÏò¶ÔÏó\class.py", line 11, in <module>
#     Money.__dict__['age'] = 44
# TypeError: 'mappingproxy' object does not support item assignment


